Repository navigation
Conversation
…compacted run_time.inf output
|
Claude Code Review Head SHA: ab44ed3 Files changed:
Findings: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2406 +/- ##
==========================================
+ Coverage 66.14% 66.21% +0.06%
==========================================
Files 112 112
Lines 31093 31100 +7
Branches 4749 4752 +3
==========================================
+ Hits 20567 20593 +26
+ Misses 6675 6664 -11
+ Partials 3851 3843 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
danieljvickers
previously approved these changes
Nov 22, 2026
Lines of Code
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution Policy
All contributions are expected to demonstrate:
If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.
Summary
s_compute_dt_from_cflands_compute_stability_from_dt(src/simulation/m_sim_helpers.fpp) bounded the explicit viscous and conduction steps byD dt / min(dx)^2 <= cfl_target, withD = max(1/Re)/rho. An explicit diffusion of diffusivityDis RK-stable forD dt sum_d(1/dx_d^2) <= 2.51/4(RK3;2/4for RK1 and RK2): the directions add, and the normal stresses diffuse with(4 mu/3 + mu_b)/rho, the largest coefficient of the viscous stress. The old number therefore understated the stability number bynum_dimstimes4/3(more with bulk viscosity), and a viscous-limitedcfl_adap_dtrun at an ordinarycfl_targetcould be unstable. This PR changes the three diffusive and capillary limits; it is a CFD-result change forcfl_adap_dt/cfl_const_dtruns that one of them limits, and it changes the VCFL, TCFL and CCFL values thatrun_time.infreports for every run.dt (4/(3 Re_1) + 1/Re_2)/rho * sum_d(1/dx_d^2)(f_visc_diffusivity,f_inv_dx2_sum). On a uniform grid with shear viscosity only it is 4/3, 8/3 and 4 times the old number in 1D, 2D and 3D. Thechem_params%transport_dtbranch is unchanged: itsRealready sums the directions.dt k/(rho c_v) * sum_d(1/dx_d^2), with the diffusivity from the news_compute_cell_diffusivity, so it is 1, 2 and 3 times the old number.capillary_alpha_min = 1e-3(f_capillary_rho). The mixture density let the light phase's bulk cells, which carry no capillary force, set a far smaller step than the interface does.run_time.infprints its columns two blanks apart and its CFL numbers asES10.3instead ofF10.6, which showed a small number such as 2.6e-3 to three digits. The closing summary uses the same format. The write blocks are about 20 lines shorter.cfl_targetindocs/documentation/case.mdnow states what it bounds.Verification
examples/2D_viscous(two fluids,Re(1) = Re(2) = 1e-4somu_b = mu, 100 x 100 uniform, WENO, RK3), switched tocfl_adap_dt = Tand run tot = 4e-7, serial CPU, NVHPC 26.3, wingtip. It is viscous-limited throughout. "Before" is master at 7982f2d. With bulk viscosity in 2D the new VCFL is(4/3 + 1) * 2 = 14/3times the old one.cfl_targetMaster at
cfl_target = 0.5is at 3.7 times the RK3 limit and fails in 30 steps. The two runs of this PR agree in the final conservative state to 3.4e-6 of its largest value; master's completed run at 0.2 differs from them by 6.1e-5, against a total change from the initial condition of 9.1e-4, so it is past the limit (0.93 against 0.63) without having blown up yet.Tests. Fixed-
dtruns cannot change: the limits enter onlys_compute_dtand the reported numbers. Of the 1034 suite cases, the 28 that setcfl_adap_dtorcfl_const_dt(17 generated cases and 11 examples) all pass on this branch against master's goldens, CPU, NVHPC 26.3; none of them is limited by a criterion this PR changes, so no golden is regenerated. The same definitions have also run the full suite in #2098's CI (1015 passed on the GNU lane).Not verified: a conduction-limited or capillary-limited case before and after (the TCFL and CCFL changes are checked by reading, and by the tests above passing); 3D; the cylindrical branch with the filtered azimuthal spacing, which
f_inv_dx2_sumhandles as the old code did but which no run here exercised; GPU builds (the kernels gain one private scalar and one device routine,s_compute_cell_diffusivity); non-Newtonian cases, whose viscous-limited examples are on the suite's skip list; whether any user's post-processing parses the oldrun_time.infcolumns.Sample
run_time.infFrom the
cfl_target = 0.2runs of the table above (examples/2D_viscous, adaptive step), table header, first rows and closing summary. Both hold VCFL at the target; the step differs because the number does.Before (master):
After (this PR):
Type of change
Testing
./mfc.sh precheck; the 28 CFL-step tests and the2D_viscouscomparison above on NVHPC 26.3 CPU.Related: split out of #2098, which carries the same changes.
This PR was made with Claude Code (AI).
🤖 Generated with Claude Code